package com.codeforces.contest.c25;

import java.util.Scanner;

public class _25A {

	static Scanner scanner = new Scanner(System.in);
	
	public static void main(String[] args) {
		int n, even, odd, num, i1, i2;
		
		n = scanner.nextInt();
		even = odd = 0;
		i1 = i2 = -1;
		for (int i=1;i<=n;++i) {
			num = scanner.nextInt();
			if (num % 2 == 0) {
				even++;
				i2 = i;
			}
			else {
				odd++;
				i1 = i;
			}
		}
		if (even == 1) {
			System.out.println(i2);
		}
		else if (odd == 1) {
			System.out.println(i1);
		}

	}

}
